package com.zja.dao;

import com.zja.model.Likes;

import java.util.List;

/**
 * @author JA
 */
public interface LikesDao {
    List<Likes> selectAll();

    Likes selectById(Long id);

    boolean insert(Likes likes);

    boolean update(Likes likes);

    boolean deleteById(Long id);

    //判断用户是否点赞
    boolean hasUserLiked(Long userId, Long articleId);
    //统计文章点赞数
    int countLikes(Long articleId);
    //删除点赞
    boolean deleteByUserAndArticle(Long userId, Long articleId);
}
